nethackfandomcom-20200214-history
Source:NetHack 3.3.0/config.h
Below is the full text to config.h from the source code of NetHack 3.3.0. To link to a particular line, write [[NetHack 3.3.0/config.h#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)config.h 3.3 1999/08/16 */ 2. /* Copyright © Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */ 6. #define CONFIG_H 7. 8. 9. /* 10. * Section 1: Operating and window systems selection. 11. * Select the version of the OS you are using. 12. * For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h. 13. * A "VMS" option is not needed since the VMS C-compilers 14. * provide it (no need to change sec#1, vmsconf.h handles it). 15. */ 16. 17. #define UNIX /* delete if no fork(), exec() available */ 18. 19. /* #define MSDOS */ /* in case it's not auto-detected */ 20. 21. /* #define OS2 */ /* define for OS/2 */ 22. 23. /* #define TOS */ /* define for Atari ST/TT */ 24. 25. /* #define STUPID */ /* avoid some complicated expressions if 26. your C compiler chokes on them */ 27. /* #define MINIMAL_TERM */ 28. /* if a terminal handles highlighting or tabs poorly, 29. try this define, used in pager.c and termcap.c */ 30. /* #define ULTRIX_CC20 */ 31. /* define only if using cc v2.0 on a DECstation */ 32. /* #define ULTRIX_PROTO */ 33. /* define for Ultrix 4.0 (or higher) on a DECstation; 34. * if you get compiler errors, don't define this. */ 35. /* Hint: if you're not developing code, don't define 36. ULTRIX_PROTO. */ 37. 38. #include "config1.h" /* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */ 39. 40. 41. /* Windowing systems... 42. * Define all of those you want supported in your binary. 43. * Some combinations make no sense. See the installation document. 44. */ 45. #define TTY_GRAPHICS /* good old tty based graphics */ 46. /* #define X11_GRAPHICS */ /* X11 interface */ 47. /* #define QT_GRAPHICS */ /* Qt interface */ 48. 49. /* 50. * Define the default window system. This should be one that is compiled 51. * into your system (see defines above). Known window systems are: 52. * 53. * tty, X11, mac, amii, Qt 54. */ 55. 56. /* MAC also means MAC windows */ 57. #ifdef MAC 58. # ifndef AUX 59. # define DEFAULT_WINDOW_SYS "mac" 60. # endif 61. #endif 62. 63. /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */ 64. #ifdef AMIGA 65. # define AMII_GRAPHICS /* (optional) */ 66. # define DEFAULT_WINDOW_SYS "amii" /* "amii", "amitile" or "tty" */ 67. #endif 68. 69. #ifdef __BEOS__ 70. /* leave at tty graphics for now */ 71. /* # define DEFAULT_WINDOW_SYS "be" */ 72. #endif 73. 74. #ifdef QT_GRAPHICS 75. # define USE_XPM /* Use XPM format for images (required) */ 76. # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ 77. # ifndef DEFAULT_WINDOW_SYS 78. # define DEFAULT_WINDOW_SYS "Qt" 79. # endif 80. #endif 81. 82. #ifndef DEFAULT_WINDOW_SYS 83. # define DEFAULT_WINDOW_SYS "tty" 84. #endif 85. 86. #ifdef X11_GRAPHICS 87. /* 88. * There are two ways that X11 tiles may be defined. (1) using a custom 89. * format loaded by NetHack code, or (2) using the XPM format loaded by 90. * the free XPM library. The second option allows you to then use other 91. * programs to generate tiles files. For example, the PBMPlus tools 92. * would allow: 93. * xpmtoppm x11tiles_big.xpm 94. */ 95. /* # define USE_XPM */ /* Disable if you do not have the XPM library */ 96. # ifdef USE_XPM 97. # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ 98. # endif 99. #endif 100. 101. 102. /* 103. * Section 2: Some global parameters and filenames. 104. * Commenting out WIZARD, LOGFILE, or NEWS removes that feature 105. * from the game; otherwise set the appropriate wizard name. 106. * LOGFILE and NEWS refer to files in the playground. 107. */ 108. 109. #ifndef WIZARD /* allow for compile-time or Makefile changes */ 110. # ifndef KR1ED 111. # define WIZARD "wizard" /* the person allowed to use the -D option */ 112. # else 113. # define WIZARD 114. # define WIZARD_NAME "wizard" 115. # endif 116. #endif 117. 118. #define LOGFILE "logfile" /* larger file for debugging purposes */ 119. #define NEWS "news" /* the file containing the latest hack news */ 120. 121. /* 122. * If COMPRESS is defined, it should contain the full path name of your 123. * 'compress' program. Defining INTERNAL_COMP causes NetHack to do 124. * simpler byte-stream compression internally. Both COMPRESS and 125. * INTERNAL_COMP create smaller bones/level/save files, but require 126. * additional code and time. Currently, only UNIX fully implements 127. * COMPRESS; other ports should be able to uncompress save files a 128. * la unixmain.c if so inclined. 129. * If you define COMPRESS, you must also define COMPRESS_EXTENSION 130. * as the extension your compressor appends to filenames after 131. * compression. 132. */ 133. 134. #ifdef UNIX 135. /* path and file name extension for compression program */ 136. #define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ 137. #define COMPRESS_EXTENSION ".Z" /* compress's extension */ 138. /* An example of one alternative you might want to use: */ 139. /* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ 140. /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ 141. #endif 142. 143. #ifndef COMPRESS 144. # define INTERNAL_COMP /* control use of NetHack's compression routines */ 145. #endif 146. 147. /* 148. * Data librarian. Defining DLB places most of the support files into 149. * a tar-like file, thus making a neater installation. See *conf.h 150. * for detailed configuration. 151. */ 152. /* #define DLB */ /* not supported on all platforms */ 153. 154. /* 155. * Defining INSURANCE slows down level changes, but allows games that 156. * died due to program or system crashes to be resumed from the point 157. * of the last level change, after running a utility program. 158. */ 159. #define INSURANCE /* allow crashed game recovery */ 160. 161. #ifndef MAC 162. # define CHDIR /* delete if no chdir() available */ 163. #endif 164. 165. #ifdef CHDIR 166. /* 167. * If you define HACKDIR, then this will be the default playground; 168. * otherwise it will be the current directory. 169. */ 170. # ifndef HACKDIR 171. # define HACKDIR "/usr/games/lib/nethackdir" /* nethack directory */ 172. # endif 173. 174. /* 175. * Some system administrators are stupid enough to make Hack suid root 176. * or suid daemon, where daemon has other powers besides that of reading or 177. * writing Hack files. In such cases one should be careful with chdir's 178. * since the user might create files in a directory of his choice. 179. * Of course SECURE is meaningful only if HACKDIR is defined. 180. */ 181. /* #define SECURE */ /* do setuid(getuid()) after chdir() */ 182. 183. /* 184. * If it is desirable to limit the number of people that can play Hack 185. * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS. 186. * #define MAX_NR_OF_PLAYERS 6 187. */ 188. #endif /* CHDIR */ 189. 190. 191. 192. /* 193. * Section 3: Definitions that may vary with system type. 194. * For example, both schar and uchar should be short ints on 195. * the AT&T 3B2/3B5/etc. family. 196. */ 197. 198. /* 199. * Uncomment the following line if your compiler doesn't understand the 200. * 'void' type (and thus would give all sorts of compile errors without 201. * this definition). 202. */ 203. /* #define NOVOID */ /* define if no "void" data type. */ 204. 205. /* 206. * Uncomment the following line if your compiler falsely claims to be 207. * a standard C compiler (i.e., defines __STDC__ without cause). 208. * Examples are Apollo's cc (in some versions) and possibly SCO UNIX's rcc. 209. */ 210. /* #define NOTSTDC */ /* define for lying compilers */ 211. 212. #include "tradstdc.h" 213. 214. /* 215. * type schar: small signed integers (8 bits suffice) (eg. TOS) 216. * 217. * typedef char schar; 218. * 219. * will do when you have signed characters; otherwise use 220. * 221. * typedef short int schar; 222. */ 223. #ifdef AZTEC 224. # define schar char 225. #else 226. typedef signed char schar; 227. #endif 228. 229. /* 230. * type uchar: small unsigned integers (8 bits suffice - but 7 bits do not) 231. * 232. * typedef unsigned char uchar; 233. * 234. * will be satisfactory if you have an "unsigned char" type; 235. * otherwise use 236. * 237. * typedef unsigned short int uchar; 238. */ 239. #ifndef _AIX32 /* identical typedef in system file causes trouble */ 240. typedef unsigned char uchar; 241. #endif 242. 243. /* 244. * Various structures have the option of using bitfields to save space. 245. * If your C compiler handles bitfields well (e.g., it can initialize structs 246. * containing bitfields), you can define BITFIELDS. Otherwise, the game will 247. * allocate a separate character for each bitfield. (The bitfields used never 248. * have more than 7 bits, and most are only 1 bit.) 249. */ 250. #define BITFIELDS /* Good bitfield handling */ 251. 252. /* #define STRNCMPI */ /* compiler/library has the strncmpi function */ 253. 254. /* 255. * There are various choices for the NetHack vision system. There is a 256. * choice of two algorithms with the same behavior. Defining VISION_TABLES 257. * creates huge (60K) tables at compile time, drastically increasing data 258. * size, but runs slightly faster than the alternate algorithm. (MSDOS in 259. * particular cannot tolerate the increase in data size; other systems can 260. * flip a coin weighted to local conditions.) 261. * 262. * If VISION_TABLES is not defined, things will be faster if you can use 263. * MACRO_CPATH. Some cpps, however, cannot deal with the size of the 264. * functions that have been macroized. 265. */ 266. 267. /* #define VISION_TABLES */ /* use vision tables generated at compile time */ 268. #ifndef VISION_TABLES 269. # ifndef NO_MACRO_CPATH 270. # define MACRO_CPATH /* use clear_path macros instead of functions */ 271. # endif 272. #endif 273. 274. /* 275. * Section 4: THE FUN STUFF!!! 276. * 277. * Conditional compilation of special options are controlled here. 278. * If you define the following flags, you will add not only to the 279. * complexity of the game but also to the size of the load module. 280. */ 281. 282. /* dungeon features */ 283. #define SINKS /* Kitchen sinks - Janet Walz */ 284. /* dungeon levels */ 285. #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ 286. #define REINCARNATION /* Special Rogue-like levels */ 287. /* monsters & objects */ 288. #define KOPS /* Keystone Kops by Scott R. Turner */ 289. #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ 290. #define STEED /* Riding steeds */ 291. #define TOURIST /* Tourist players with cameras and Hawaiian shirts */ 292. /* difficulty */ 293. #define ELBERETH /* Engraving the E-word repels monsters */ 294. /* I/O */ 295. #define REDO /* support for redoing last command - DGK */ 296. #if !defined(MAC) 297. # define CLIPPING /* allow smaller screens -- ERS */ 298. #endif 299. 300. #ifdef REDO 301. # define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ 302. #endif 303. 304. #define EXP_ON_BOTL /* Show experience on bottom line */ 305. /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ 306. 307. #include "global.h" /* Define everything else according to choices above */ 308. 309. #endif /* CONFIG_H */ config.h